| Total Complexity | 4 |
| Total Lines | 15 |
| Duplicated Lines | 0 % |
| Changes | 0 | ||
| 1 | class Queue { |
||
| 2 | // put your code here to address problems |
||
| 3 | constructor() { |
||
| 4 | this.data = []; |
||
| 5 | } |
||
| 6 | enqueue(record) { |
||
| 7 | this.data.unshift(record); |
||
| 8 | } |
||
| 9 | dequeue() { |
||
| 10 | return this.data.pop(); |
||
| 11 | } |
||
| 12 | peek() { |
||
| 13 | return this.data; |
||
| 14 | } |
||
| 15 | } |
||
| 16 | |||
| 17 | module.exports = Queue; |